package com.morningstar.system.dao.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.morningstar.common.dao.entity.BaseEntity;
import lombok.Getter;
import lombok.Setter;

import java.util.List;

/**
 * 部门表 sys_dept
 *
 * @author ruoyi
 */
@Getter
@Setter
@TableName("sys_dept")
public class SysDept extends BaseEntity {
    /**
     * 部门ID
     */
    @TableId(value = "dept_id", type = IdType.ASSIGN_ID)
    private Long deptId;

    /**
     * 父部门ID
     */
    @TableField("parent_id")
    private Long parentId;

    /**
     * 部门名称
     */
    @TableField("dept_name")
    private String deptName;

    /**
     * 显示顺序
     */
    @TableField("order_num")
    private Integer orderNum;

    /**
     * 负责人
     */
    @TableField("leader")
    private Long leader;

    /**
     * 部门状态:0正常,1停用
     */
    @TableField("status")
    private String status;

    /**
     * 负责人姓名
     */
    @TableField(exist = false)
    private String leaderName;

    /**
     * 联系电话
     */
    @TableField(exist = false)
    private String phone;

    /**
     * 邮箱
     */
    @TableField(exist = false)
    private String email;


    @TableField(exist = false)
    private List<SysDept> children;
}
